
import org.junit.Assert;

import java.util.List;
import java.util.stream.Collectors;

public class NGuessNumberTest {
    public static void main(String[] args) {

        NGuessNumber nGuessNumber=new NGuessNumber();
        List<Integer> list=nGuessNumber.generateAnswer();
        Assert.assertEquals(list.size(),4);
        Assert.assertEquals(list.size(),list.stream().distinct().collect(Collectors.toList()).size());
        Assert.assertEquals(list.size(),list.stream().filter(num->num>=0&&num<=9).collect(Collectors.toList()).size());
    }
   }
